﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
using System.Web;

namespace AjaxControlFramework.Reflection
{
    public class MethodCacheEntry : ReflectiveCacheEntry
    {
        //------// Properties \\--------------------------------------------\\
        new public virtual MethodInvoke Delegate { get; set; }

        
        new public virtual MethodInfo Info
        {
            get { return (MethodInfo)base.Info; }
            set { base.Info = value; }
        }


        public virtual AjaxControlMethodAttribute Attribute { get; set; }
        //------\\ Properties //--------------------------------------------//



        //------// Constructors \\------------------------------------------\\
        public MethodCacheEntry()
            : base()
        { }


        public MethodCacheEntry(string methodName)
            : base(methodName)
        { }


        public MethodCacheEntry(string methodName, AjaxControlMethodAttribute attribute)
            : base(methodName)
        {
            Attribute = attribute;
        }


        public MethodCacheEntry(string methodName, MethodInfo info, MethodInvoke del)
            : base(methodName, info, null)
        {
            Delegate = del;
        }


        public MethodCacheEntry(string methodName, MethodInfo info, MethodInvoke del, AjaxControlMethodAttribute attribute)
            : base(methodName, info, null)
        {
            Delegate = del;
            Attribute = attribute;
        }
        //------\\ Constructors //------------------------------------------//



        //------// Methods \\-----------------------------------------------\\

        //------\\ Methods //-----------------------------------------------//
    }
}
